package com.example.showlocation;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.content.res.ColorStateList;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;

import com.example.showlocation.TextureMapViewActivity;
import com.google.android.material.chip.Chip;

public class ContentActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_content);
        Intent intent=getIntent();
        Chip chip1=((Chip)findViewById(com.example.showlocation.R.id.chip1));
        if (intent.getBooleanExtra("isLocated", false) == true) {

            chip1.setText(intent.getStringExtra("name"));

        }
        else{
            chip1.setVisibility(View.INVISIBLE);
        }


    }
    @SuppressLint("IntentReset")
    public void showlocation(View view)  {
        Intent intent=new Intent(this, TextureMapViewActivity.class);
        startActivity(intent);
    }
}